Page({
    data: {
        username: "",
        phone: "",
        fileList: []
    },
    async afterRead(e) {
        let file = wx.getFileSystemManager()
        let fileList = e.detail.file.map(item => {
            return file.readFileSync(item.url)
        })
        this.setData({
            fileList
        })
    },
    //批量上传
    async handleClick() {
        let result = await wx.cloud.callFunction({
            name: "upload",
            data: {
                fileList: this.data.fileList
            }
        }).catch(err => console.error(err))
        console.log(result)
    }

})